#include <bits/stdc++.h>
using namespace std;

const int N=1e5+5;

int n,a[N];
multiset<int> alive;

int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%d",&n);
    for(int i=1;i<=n;++i) scanf("%d",&a[i]);
    sort(a+1,a+n+1);
    for(int i=1;i<=n;++i){
        if(!alive.empty()&&*alive.begin()<a[i]){
            auto it=--alive.lower_bound(a[i]);
            alive.erase(it);
        }
        alive.insert(a[i]);
    }
    printf("%d\n",alive.size());
    return 0;
}
